import request from '@/utils/request'
/* 用户登录 */
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

/* 用户退出 */
export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function getAll(data) {
  return request({
    url: '/user/getAll',
    method: 'post',
    data
  })
}
export function set(data) {
  return request({
    url: '/user/set',
    method: 'post',
    data
  })
}
export function resetPassword(data) {
  return request({
    url: '/user/resetPassword',
    method: 'post',
    data
  })
}
export function setPassword(data) {
  return request({
    url: '/user/setPassword',
    method: 'post',
    data
  })
}
export function del(data) {
  return request({
    url: '/user/del',
    method: 'post',
    data
  })
}
export function add(data) {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}